package datastructre;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;

public class MapDemo {
    public static void main(String[] args) {
        Map<String,String> map = new HashMap<>();

        //put  添加/覆盖
        //不存在key，直接添加；返回NULL
        //存在key，覆盖value，覆盖原有value
        String v1 = map.put("zfl","qinyuan");
        System.out.println(map.containsKey("zfl"));
        System.out.println(map.containsValue("qinyuan"));
//        String v2 = map.put("zfl","zfl");
//        System.out.println(v2);
//        String v3 = map.remove("zfl");
//        System.out.println(v3);

        System.out.println(map);
    }
}
